package primetest.dto;

import java.util.UUID;

public class BuildingDto {
	private String key;
	private String name;
	private int floorCount = 5;
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getFloorCount() {
		return floorCount;
	}
	public void setFloorCount(int floorCout) {
		this.floorCount = floorCout;
	}
	public BuildingDto() {
		key = UUID.randomUUID().toString();
	}
	public BuildingDto(String key, String name, int floorCout) {
		this.key = key;
		this.name = name;
		this.floorCount = floorCout;
	}

	public void setAll(BuildingDto dto) {
		this.key = dto.key;
		this.name = dto.name;
		this.floorCount = dto.floorCount;
	}

	public boolean isValid() {
		if (floorCount <= 0) {
			return false;
		}
		return true;
	}
}
